﻿using UnityEngine;
using System.Collections;
using XLua;

[LuaCallCSharp]
public class BuildPath  {

	private static BuildPath instance = null;

    public static BuildPath _Instance
    {
        get
        {
            if (instance == null)
                instance = new BuildPath();
            return instance;
        }
    }

    public string PCPath = Application.dataPath + "/";

    public string PCPat_lua = Application.dataPath + "/Lua/"; 
    public string PCPath_hotFix = Application.dataPath + "/HotFitResources/";
    public string MacPath = Application.dataPath + "/StreamingAssets/xml/";

    
    /// <summary>
    /// 外部资源存放的路径（AssetBundle、xml、txt）
    /// </summary>
    public string ResourceFolder
    {
        get
        {
            switch (Application.platform)
            {
                case RuntimePlatform.Android:   //安卓
                    return string.Concat(Application.persistentDataPath, "/");
                case RuntimePlatform.IPhonePlayer:  //Iphone
                    return string.Concat(Application.persistentDataPath, "/");
                case RuntimePlatform.OSXEditor: //MAC
                case RuntimePlatform.WindowsEditor: //windows
                    return string.Concat(Application.persistentDataPath, "/");
                default:
                    return string.Concat(Application.dataPath , "/");

            }
                
        }
    }


}
